<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title></title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
</head>

<body>

    <div id="app">
        <div id="exam1">
            <div class="title">1. 把 users 数据，在 content 中循环显示出来,项包括 name 和 age</div>
            <div class="content">

            </div>
        </div>
        <div id="exam2">
            <div class="title">2. 把 html 的内容，显示在 content 中</div>
            <div class="content">
            </div>
        </div>
        <div id="exam3">
            <div class="title">3. 点击按钮切换显示两个 div 内容</div>
            <div class="content">
                <input type="button" value="点我切换" />
                <div class="ok">
                    ok
                </div>
                <div class="no">
                    no
                </div>
            </div>
        </div>
        <div id="exam4">
            <div class="title">4. 将文本框输入的内容，显示在下面 div 中</div>
            <div class="content">
                <input type="text" />
                <div class="text">
                    显示在这
                </div>
            </div>
        </div>
        <div id="exam5">
            <div class="title">5. 点击按钮给 div 增加 red class</div>
            <div class="content">
                <input type="button" value="点击我增加 red class" />
                <div class="text">
                    我的颜色会变
                </div>
            </div>
        </div>
        <div class="component">
            <el-switch v-model="value2" active-color="#13ce66" inactive-color="#ff4949">
            </el-switch>
        </div>
    </div>
    <script>
        var app = new Vue({
            el: '#app',
            data: {
                users: [{ name: "A", age: 21 }, { name: "B", age: 22 }, { name: "C", age: 11 }, { name: "D", age: 15 }],
                html: '<span style="color:red;">你好</span>',
                ok: false,
                value2: true
            }
        })
    </script>
    <style>
        .red {
            color: red;
        }
    </style>
</body>

</html>